Skip to content

fix: resolve PropType validation errors and add test data defaults#84

Merged
awais-ansari merged 1 commit intomainfrom
aansari/release-SEMANTIC-token
Mar 11, 2026
Merged

fix: resolve PropType validation errors and add test data defaults#84
awais-ansari merged 1 commit intomainfrom
aansari/release-SEMANTIC-token

Conversation

@awais-ansari
Copy link
Contributor

Summary
Fixes PropType validation warnings that were causing test failures and updates test factories to include all required data fields.

Changes Made

  1. PropType Validation Fixes NotificationRowItem Component
  2. Migrated from deprecated defaultProps to JavaScript default parameters. Changed and lastRead from required to optional PropTypes
  3. Added default values: type = '' , lastRead = '' in Notifications Component

Notifications Component

  1. Made notificationExpiryDays optional in PropTypes to handle undefined values gracefully
  2. Added nullish coalescing operator (??) to ensure notificationExpiryDays always defaults to 0

Test Data Updates Notification Factory (notifications.factory.js)

  1. Added notification_expiry_days: 60 to notificationsCount factory
  2. Ensures all test mocks provide complete data matching API contracts

@awais-ansari awais-ansari merged commit b34e640 into main Mar 11, 2026
4 of 5 checks passed
@awais-ansari awais-ansari deleted the aansari/release-SEMANTIC-token branch March 11, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant